import { Modal, Progress } from 'antd';
import React from 'react';
import { useEffect, useRef } from 'react';

const strokeColor = localStorage.getItem('cpasPrimaryColor') || undefined;
const AgeCalcProgress = (props) => {
  const { progressInfo } = props

  return (
    <Modal
      open={props.calcLoading}
      title={<div style={{ fontSize: 15 }}>{props.title}</div>}
      closable={false}
      centered={true}
      footer={null}
      maskClosable={false}
      zIndex={10000}
      width={560}
    >
      <div style={{ marginTop: 0, marginBottom: 20, padding: '0 16px' }}>
        <Progress
          percent={progressInfo.progressValue}
          status="active"
          strokeColor={strokeColor}
        ></Progress>
        <div>
          {progressInfo.progressText} {progressInfo.elapsedTime}
        </div>
      </div>
    </Modal>
  );
};

export default AgeCalcProgress;
